home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Object = "{03B95A9D-DBDD-11D2-87A3-97F32F5E191C}#1.1#0"; "DSIELink.ocx"
- Begin VB.Form FrmDemo3
- BorderStyle = 3 'Fixed Dialog
- Caption = "Demo of the URL link control.."
- ClientHeight = 3735
- ClientLeft = 45
- ClientTop = 330
- ClientWidth = 7170
- Icon = "FrmDemo3.frx":0000
- LinkTopic = "FrmDemo3"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 3735
- ScaleWidth = 7170
- StartUpPosition = 2 'CenterScreen
- Begin VB.Frame Frames
- Caption = "URL Saving..."
- Height = 2295
- Index = 1
- Left = 3960
- TabIndex = 8
- Top = 1320
- Width = 3135
- Begin VB.CheckBox DatForce
- Caption = "&Visited"
- Height = 255
- Left = 2040
- TabIndex = 13
- Top = 1680
- Width = 855
- End
- Begin VB.CommandButton BtnReset
- Caption = "&Reset"
- Height = 375
- Index = 1
- Left = 240
- TabIndex = 9
- Top = 1680
- Width = 1095
- End
- Begin DSIELink.IELink Links
- Height = 225
- Index = 1
- Left = 120
- TabIndex = 10
- Top = 1320
- Width = 1365
- _ExtentX = 2408
- _ExtentY = 397
- Caption = "Open the Harddisk"
- URL = "C:\"
- Hover = 0 'False
- IESync = 3
- SaveURL = -1 'True
- Picture = "FrmDemo3.frx":0442
- HoverPicture = "FrmDemo3.frx":0B70
- VisitedPicture = "FrmDemo3.frx":129E
- End
- Begin DSIELink.IELink Links
- Height = 225
- Index = 2
- Left = 1680
- TabIndex = 12
- Top = 1320
- Width = 1365
- _ExtentX = 2408
- _ExtentY = 397
- Caption = "Open the Harddisk"
- URL = "C:\"
- Hover = 0 'False
- IESync = 3
- Picture = "FrmDemo3.frx":19CC
- HoverPicture = "FrmDemo3.frx":20FA
- VisitedPicture = "FrmDemo3.frx":2828
- End
- Begin VB.Label LblLabels
- AutoSize = -1 'True
- Caption = $"FrmDemo3.frx":2F56
- Height = 975
- Index = 3
- Left = 120
- TabIndex = 11
- Top = 240
- Width = 2850
- WordWrap = -1 'True
- End
- End
- Begin VB.Frame Frames
- Caption = "Graphics..."
- Height = 2295
- Index = 0
- Left = 120
- TabIndex = 2
- Top = 1320
- Width = 3735
- Begin VB.CommandButton BtnReset
- Caption = "&Reset"
- Height = 375
- Index = 0
- Left = 120
- TabIndex = 7
- Top = 1320
- Width = 1095
- End
- Begin DSIELink.IELink Links
- Height = 705
- Index = 0
- Left = 120
- TabIndex = 5
- Top = 360
- Width = 1065
- _ExtentX = 1879
- _ExtentY = 1244
- URL = "C:\"
- Style = 3
- SaveURL = -1 'True
- Picture = "FrmDemo3.frx":3009
- HoverPicture = "FrmDemo3.frx":3737
- VisitedPicture = "FrmDemo3.frx":3E65
- End
- Begin VB.Label LblLabels
- AutoSize = -1 'True
- Caption = $"FrmDemo3.frx":4593
- Height = 1560
- Index = 2
- Left = 1320
- TabIndex = 6
- Top = 480
- Width = 2250
- WordWrap = -1 'True
- End
- End
- Begin VB.CommandButton BtnDemo
- Caption = "&Demo Form 1"
- Height = 375
- Index = 0
- Left = 4800
- TabIndex = 1
- Top = 120
- Width = 1095
- End
- Begin VB.CommandButton BtnDemo
- Caption = "Demo &Form 2"
- Height = 375
- Index = 1
- Left = 6000
- TabIndex = 0
- Top = 120
- Width = 1095
- End
- Begin VB.Image ImgLogo
- Height = 480
- Left = 120
- Picture = "FrmDemo3.frx":467C
- Top = 120
- Width = 480
- End
- Begin VB.Label LblLabels
- AutoSize = -1 'True
- Caption = $"FrmDemo3.frx":4986
- Height = 780
- Index = 0
- Left = 720
- TabIndex = 4
- Top = 120
- Width = 3690
- WordWrap = -1 'True
- End
- Begin VB.Label LblLabels
- AutoSize = -1 'True
- Caption = "This form demonstrates the URL saving feature and then Graphics feature of the control"
- Height = 255
- Index = 1
- Left = 120
- TabIndex = 3
- Top = 1080
- Width = 6330
- WordWrap = -1 'True
- End
- Attribute VB_Name = "FrmDemo3"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Option Explicit
- Private Declare Function RegDeleteValue Lib "advapi32.dll" Alias "RegDeleteValueA" (ByVal hKey As Long, ByVal lpValueName As String) As Long
- Private Declare Function RegCloseKey Lib "advapi32.dll" (ByVal hKey As Long) As Long
- Private Declare Function RegOpenKey Lib "advapi32.dll" Alias "RegOpenKeyA" (ByVal hKey As Long, ByVal lpSubKey As String, phkResult As Long) As Long
- Private Sub BtnDemo_Click(Index As Integer)
- Me.Hide
- If Index = 0 Then
- FrmDemo1.Show
- Else
- FrmDemo2.Show
- End If
- End Sub
- Private Sub DatForce_Click()
- FrmDemo3.Links(2).ForceVisited = (FrmDemo3.DatForce.Value = 1)
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- End
- End Sub
- Private Sub BtnReset_Click(Index As Integer)
- 'This is a cheat that enables the URL to appear to be
- 'unvisited
- 'Do not try to replicate this behaviour in your programs
- 'Certain URLs are coded in the Registry and should
- 'not be tampered with - mess about at your own peril!!
- Dim hKey As Long
- If RegOpenKey(&H80000001, "Software\Dave Software\URLs\ActiveX\Visited", hKey) <> 0 Then Exit Sub
- RegDeleteValue hKey, "c:\"
- RegCloseKey hKey
- 'It is necessary to make the controls repaint themselves
- 'URLs were never intended to be "unvisited"
- FrmDemo3.Links(0).Color = RGB(0, 0, 255)
- FrmDemo3.Links(1).Color = RGB(0, 0, 255)
- End Sub
-